package com.gg.hc.controller;

import com.gg.common.pojo.DModuleDetails;
import com.gg.common.pojo.DesignModule;
import com.gg.common.pojo.MDesignProcedureModule;
import com.gg.hc.service.DesignModuleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class DesignModuleController {
    @Resource
    private DesignModuleService designModuleService;
    @ResponseBody
    @RequestMapping("/queryDesignModuleByproductId.action")
    public DesignModule queryDesignModuleByproductId(String parenId){
        return designModuleService.queryDesignModuleByproductId(parenId);
    }
    @ResponseBody
    @RequestMapping("/updateDesignModuleTag.action")
    public int updateMDesignProcedureModule(@RequestBody List<MDesignProcedureModule> mDesignProcedureModules){
        return designModuleService.updateDesignModuleTag(mDesignProcedureModules);
    }
    @ResponseBody
    @RequestMapping("/queryDModuleDetailsByproductId.action")
    public DesignModule queryDModuleDetailsByproductId(String productId){
        return designModuleService.queryDModuleDetailsByproductId(productId);
    }


}
